<template>
  <div class="app-container" style="display: flex;justify-content: center;align-items: center">
    <el-form :model="form" label-width="auto" style="max-width: 600px">

      <el-form-item label="事务申请选项">
        <el-select v-model="form.type" placeholder="请选择事务">
          <el-option label="进社申请" value="1"/>
          <el-option label="退社申请" value="2"/>
          <el-option label="活动申请" value="3"/>
          <el-option label="场地申请" value="4"/>
          <el-option label="其他（选此项必填备注）" value="5"/>
        </el-select>
      </el-form-item>


      <el-form-item label="申请原因/备注">
        <el-input v-model="form.desc" :rows="10" style="width: 500px;" type="textarea"/>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">提交</el-button>
        <el-button @click="reset">重置</el-button>
      </el-form-item>
    </el-form>
  </div>

</template>

<script lang="ts" setup>
import {reactive} from 'vue'

// do not use same name with ref
const form = reactive({
  type: [],
  desc: '',
})

const onSubmit = () => {
  console.log('submit!')
}

const reset = () => {
  // console.log('submit!')
  form.desc = '';
  form.type = []
}
</script>


<style lang="scss" scoped>

</style>
